<?
//==============================
//自动扫描extender下文件，每一个文件夹就是一个子系统；
//全部函数文件（.php）导入。
//==============================


function list_extender($dir)
{
    if(is_dir($dir))
    {
        if ($dh = opendir($dir))
        {
            while (($file = readdir($dh)) !== false)
            {
                if((is_dir($dir."/".$file)) && $file!="." && $file!="..")
                {
                    //list_extender($dir."/".$file."/");
                    $result[]=$file;
                }


            }
            closedir($dh);
        }
    }

    return $result;
}



$extender_list=list_extender(ROOT_PATH_."/controller/extender");



for($i=0;$i<count($extender_list);$i++)
{
    include_once (ROOT_PATH_."/controller/extender/".$extender_list[$i]."/config.php");
}



//调整一下顺序，按照config的设置重排数组

$neworder = [];
foreach ($plate as $key => $v) {
    $plate[$key]['order'] = $v['order'];
    $neworder[] = $plate[$key]['order'];
}
array_multisort($neworder, SORT_ASC, $plate);


//print_r2($plate);
////最后输出plate为所有extender的config信息
//exit;



//开发中的测试环境，用来限定板块
//开发中的测试环境，用来限定板块
//开发中的测试环境，用来限定板块
//状态  public developing stop
//$plate['case']['status']      = "public";
//$plate['case']['status']      = "public";
//$plate['case']['status']      = "public";
//$plate['quotation']['status']      = "public";
////开发中的测试环境，用来限定板块
////开发中的测试环境，用来限定板块
////开发中的测试环境，用来限定板块
////状态  public developing stop
//$plate['case']['status']      = "public";
//$plate['case']['status']      = "public";
//$plate['case']['status']      = "public";
//$plate['quotation']['status']      = "public";
//
//$plate['order']['status']     = "false";
//$plate['equipment']['status'] = "false";
//$plate['basic']['status']     = "false";
//$plate['aftersale']['status'] = "false";
//$plate['repair']['status']    = "false";
//$plate['task']['status']      = "false";





?>





